﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02001117 RID: 4375
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class SellItemCsReq : IMessage<SellItemCsReq>, IMessage, IEquatable<SellItemCsReq>, IDeepCloneable<SellItemCsReq>, IBufferMessage
	{
		// Token: 0x17003770 RID: 14192
		// (get) Token: 0x0600C3D2 RID: 50130 RVA: 0x00211995 File Offset: 0x0020FB95
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<SellItemCsReq> Parser
		{
			get
			{
				return SellItemCsReq._parser;
			}
		}

		// Token: 0x17003771 RID: 14193
		// (get) Token: 0x0600C3D3 RID: 50131 RVA: 0x0021199C File Offset: 0x0020FB9C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return SellItemCsReqReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17003772 RID: 14194
		// (get) Token: 0x0600C3D4 RID: 50132 RVA: 0x002119AE File Offset: 0x0020FBAE
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return SellItemCsReq.Descriptor;
			}
		}

		// Token: 0x0600C3D5 RID: 50133 RVA: 0x002119B5 File Offset: 0x0020FBB5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public SellItemCsReq()
		{
		}

		// Token: 0x0600C3D6 RID: 50134 RVA: 0x002119C0 File Offset: 0x0020FBC0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public SellItemCsReq(SellItemCsReq other) : this()
		{
			this.toMaterial_ = other.toMaterial_;
			this.costData_ = ((other.costData_ != null) ? other.costData_.Clone() : null);
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x0600C3D7 RID: 50135 RVA: 0x00211A0C File Offset: 0x0020FC0C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public SellItemCsReq Clone()
		{
			return new SellItemCsReq(this);
		}

		// Token: 0x17003773 RID: 14195
		// (get) Token: 0x0600C3D8 RID: 50136 RVA: 0x00211A14 File Offset: 0x0020FC14
		// (set) Token: 0x0600C3D9 RID: 50137 RVA: 0x00211A1C File Offset: 0x0020FC1C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool ToMaterial
		{
			get
			{
				return this.toMaterial_;
			}
			set
			{
				this.toMaterial_ = value;
			}
		}

		// Token: 0x17003774 RID: 14196
		// (get) Token: 0x0600C3DA RID: 50138 RVA: 0x00211A25 File Offset: 0x0020FC25
		// (set) Token: 0x0600C3DB RID: 50139 RVA: 0x00211A2D File Offset: 0x0020FC2D
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ItemCostData CostData
		{
			get
			{
				return this.costData_;
			}
			set
			{
				this.costData_ = value;
			}
		}

		// Token: 0x0600C3DC RID: 50140 RVA: 0x00211A36 File Offset: 0x0020FC36
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as SellItemCsReq);
		}

		// Token: 0x0600C3DD RID: 50141 RVA: 0x00211A44 File Offset: 0x0020FC44
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(SellItemCsReq other)
		{
			return other != null && (other == this || (this.ToMaterial == other.ToMaterial && object.Equals(this.CostData, other.CostData) && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x0600C3DE RID: 50142 RVA: 0x00211A94 File Offset: 0x0020FC94
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.ToMaterial)
			{
				num ^= this.ToMaterial.GetHashCode();
			}
			if (this.costData_ != null)
			{
				num ^= this.CostData.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x0600C3DF RID: 50143 RVA: 0x00211AE9 File Offset: 0x0020FCE9
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x0600C3E0 RID: 50144 RVA: 0x00211AF1 File Offset: 0x0020FCF1
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x0600C3E1 RID: 50145 RVA: 0x00211AFC File Offset: 0x0020FCFC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.ToMaterial)
			{
				output.WriteRawTag(8);
				output.WriteBool(this.ToMaterial);
			}
			if (this.costData_ != null)
			{
				output.WriteRawTag(34);
				output.WriteMessage(this.CostData);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x0600C3E2 RID: 50146 RVA: 0x00211B54 File Offset: 0x0020FD54
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.ToMaterial)
			{
				num += 2;
			}
			if (this.costData_ != null)
			{
				num += 1 + CodedOutputStream.ComputeMessageSize(this.CostData);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x0600C3E3 RID: 50147 RVA: 0x00211BA0 File Offset: 0x0020FDA0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(SellItemCsReq other)
		{
			if (other == null)
			{
				return;
			}
			if (other.ToMaterial)
			{
				this.ToMaterial = other.ToMaterial;
			}
			if (other.costData_ != null)
			{
				if (this.costData_ == null)
				{
					this.CostData = new ItemCostData();
				}
				this.CostData.MergeFrom(other.CostData);
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x0600C3E4 RID: 50148 RVA: 0x00211C08 File Offset: 0x0020FE08
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x0600C3E5 RID: 50149 RVA: 0x00211C14 File Offset: 0x0020FE14
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num != 8U)
				{
					if (num != 34U)
					{
						this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
					}
					else
					{
						if (this.costData_ == null)
						{
							this.CostData = new ItemCostData();
						}
						input.ReadMessage(this.CostData);
					}
				}
				else
				{
					this.ToMaterial = input.ReadBool();
				}
			}
		}

		// Token: 0x04004F05 RID: 20229
		private static readonly MessageParser<SellItemCsReq> _parser = new MessageParser<SellItemCsReq>(() => new SellItemCsReq());

		// Token: 0x04004F06 RID: 20230
		private UnknownFieldSet _unknownFields;

		// Token: 0x04004F07 RID: 20231
		public const int ToMaterialFieldNumber = 1;

		// Token: 0x04004F08 RID: 20232
		private bool toMaterial_;

		// Token: 0x04004F09 RID: 20233
		public const int CostDataFieldNumber = 4;

		// Token: 0x04004F0A RID: 20234
		private ItemCostData costData_;
	}
}
